package com.hissy.common.design.structure.adapter.objadapter;

import com.hissy.common.design.structure.adapter.classadapter.Adaptee;
import com.hissy.common.design.structure.adapter.classadapter.Target;

/**
 * Created by zhangyanfei on 2019/4/10.
 *
 * @author zhangyanfei
 * @date 2019/04/10
 */
public class ObjAdapter implements Target {
    /**
     * 通过关联的方式来重用代码
     */
    private Adaptee adaptee;

    ObjAdapter(Adaptee adaptee) {
        this.adaptee = adaptee;
    }

    @Override
    public void request() {
        adaptee.specialRequest();
    }
}
